import request from '@/utils/request'

export function getCaptcha() {
  return request({
    url: '/captcha',
    method: 'get'
  })
}

export function getMailCode(data) {
  return request({
    url: '/sendEmailCode',
    method: 'post',
    data,
    timeout: 20000
  })
}

//发送短信验证码
export function sendMobileCode(data) {
  return request({
    url: '/getResetPasswordCode',
    method: 'post',
    data
  })
}

// 重置密码
export function setPassword(data) {
  return request({
    url: '/resetPassword',
    method: 'post',
    data,
  })
}
